package com.globalwave.rule.entity;

import java.io.Serializable;

import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.impl.LogFactoryImpl;



/**
 * 条件结点，每一个结点包括了条件值、条件的比较符、逻辑运算符等
 * <p/>
 * 子结点与你结点的逻辑关系关系是“与”关系，子结点集按集合的先后顺序作为运算顺序，
 * 因此设置子结点集的第一个结点的逻辑运算符为“与”，以作为父结点与子结点集的的一种逻辑运算关系。
 * 
 * @author 陈向荣
 * @version 1.0
 * 
 * Modification history:
 * {date} Modified by {who} & {why} & {what} is modified
 */
public class RuleLimit implements Cloneable , Serializable{

    private static final long serialVersionUID = 1L;

    protected Log log = LogFactoryImpl.getLog(this.getClass()) ;

    private Long id ;
    private Long pro_limit_node_id ;
    
    
    private short logic_operator ;

    private String l_property ;
    private String l_convertor ;
    private String l_value ;
    
    private short operator_ ;
    private int type_ ;

    private String r_property ;
    private String r_convertor ;
    private String r_value ;
    
    

    /**
     * 克隆本结点，浅克隆，不克隆本结点的子结点
     */
    @Override
    protected Object clone() throws CloneNotSupportedException {
        RuleLimit newNode = (RuleLimit) super.clone();
        try {
            BeanUtils.copyProperties(newNode, this) ;
        } catch (Exception e) {
            log.error(e.getMessage(), e) ;
        }
        return newNode ;
    }

	public Log getLog() {
		return log;
	}

	public void setLog(Log log) {
		this.log = log;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public short getLogic_operator() {
		return logic_operator;
	}

	public void setLogic_operator(short logic_operator) {
		this.logic_operator = logic_operator;
	}

	public String getL_property() {
		return l_property;
	}

	public void setL_property(String l_property) {
		this.l_property = l_property;
	}

	public String getL_convertor() {
		return l_convertor;
	}

	public void setL_convertor(String l_convertor) {
		this.l_convertor = l_convertor;
	}

	public String getL_value() {
		return l_value;
	}

	public void setL_value(String l_value) {
		this.l_value = l_value;
	}

	public short getOperator_() {
		return operator_;
	}

	public void setOperator_(short operator_) {
		this.operator_ = operator_;
	}

	public int getType_() {
		return type_;
	}

	public void setType_(int type_) {
		this.type_ = type_;
	}

	public String getR_property() {
		return r_property;
	}

	public void setR_property(String r_property) {
		this.r_property = r_property;
	}

	public String getR_convertor() {
		return r_convertor;
	}

	public void setR_convertor(String r_convertor) {
		this.r_convertor = r_convertor;
	}

	public String getR_value() {
		return r_value;
	}

	public void setR_value(String r_value) {
		this.r_value = r_value;
	}

	public Long getPro_limit_node_id() {
		return pro_limit_node_id;
	}

	public void setPro_limit_node_id(Long pro_limit_node_id) {
		this.pro_limit_node_id = pro_limit_node_id;
	}

    
}
